<template>
  <div>
    <el-row>
      <el-col :span="16" :offset="4">
        <h1 v-show="havaDate" style="color: red;">热招岗位</h1>
        <div v-show="!havaDate">
          <h1>请联系老师添加详细岗位数据</h1>
        </div>
        <div v-show="havaDate" class="lectureClass">
          <div v-for="item in details" :key="item.rDetailsId">
            <h1>{{ item.rDetailsName }}</h1>
            <h3>详细岗位：{{ item.rDetailsPost }}</h3>
            <h3>热招岗位：{{ item.rDetailsPostHeat }}</h3>
            <h3>岗位发展路径：{{ item.rDetailsPostGrow }}</h3>
            <h3>岗位简介：{{ item.rDetailsRemake }}</h3>
            <h3>岗位要求：{{ item.rDetailsPostDemand }}</h3>
            <h3>企业文化：{{ item.rDetailsBusinessCulture }}</h3>
            <h3>发布时间：{{ item.createTime }}</h3>
          </div>
        </div>

      </el-col>
    </el-row>

  </div>
</template>
<script>
import { getDetailsByRecruitId } from '@/api/zua/details'

export default ({
  data() {
    return {
      recruitId: null,
      details: {},
      havaDate: true
    }
  },
  async  created() {
    this.recruitId = this.$route.params && this.$route.params.recruitId
    await this.getDetailsList(this.recruitId)
    if (this.details.length === 0) {
      this.havaDate = false
    }
    // console.log(this.havaDate)
  },
  methods: {
    async getDetailsList(id) {
      await getDetailsByRecruitId(id).then(res => {
        this.details = res.rows
      })
    }
  }

})
</script>
<style  scoped>
.lectureClass {
    margin-top: 25px;
    min-height: 600px;
    background: #f9f9f9;
    border: 1px solid #cccccc;
    float: right;
    width: 100%;
    white-space: normal;
    word-break: break-all;
    font-size: 14px;
    line-height: 25px;
}
h1{
    margin-top: 30px;
    text-align: center;
}
h2{
    font-family: 微软雅黑, "Microsoft YaHei";
    padding-left: 70px;
    font-size: 20px;
    margin-left: 30px;
    font-size: 18px;
    color: #666666;
    line-height: 35px;
}
h3{
    font-family: 微软雅黑, "Microsoft YaHei";
    padding-left: 70px;
    font-size: 20px;
    margin-left: 30px;
    font-size: 13px;
    color: #666666;
    line-height: 35px;
}
</style>
